<script setup>
import {ref,watch} from 'vue'
const imgList = [
'https://cxk-1305128831.cos.ap-beijing.myqcloud.com/11-00.gif',
'https://cxk-1305128831.cos.ap-beijing.myqcloud.com/11-01.gif',
'https://cxk-1305128831.cos.ap-beijing.myqcloud.com/11-02.gif',
'https://cxk-1305128831.cos.ap-beijing.myqcloud.com/11-03.gif',
'https://cxk-1305128831.cos.ap-beijing.myqcloud.com/11-04.png',
'https://cxk-1305128831.cos.ap-beijing.myqcloud.com/11-05.png'
]
const i = ref(0)
</script>

<template>
<div>
<button v-if="i>=1" @click="i--">上一张</button>
</div>
<div>
<img :src="imgList[i]"></img>
</div>
<div>
  <button v-if="i<imgList.length-1" @click="i++">下一页</button>
</div>
</template>

<style scoped>
</style>
